<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<div th:insert="/common.html"></div>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <SCRIPT type="text/javascript">
        var setting = {
            data: {
                simpleData: {
                    enable: true
                }
            },
            check: {
                enable: true,
                autoCheckTrigger: true
            },
            async: {
                enable: true,
                url: "/menu/getInfoZtreeChecked/" + $("#roleId").val(),
                autoParam: ["id", "name"]
            },
        };

        $(document).ready(function(){
            $.fn.zTree.init($("#treeDemo"), setting);
        });
    </SCRIPT>
</head>
<body>
    <form id="update_form">
    <input type="hidden" name="roleId" id="roleId" th:value="${a.roleId}">
    职务：<input type="text" name="roleName" th:value="${a.roleName}"><br>
    权限：<div class="zTreeDemoBackground left">
    <ul id="treeDemo" class="ztree"></ul>
</div>
</form>
</body>
</html>